<template>
	<view>
		<view style="padding: 30rpx;background-color: #0ec59c;color: #ffffff;">
			{{company.name}}
			<view style="display: flex;justify-content: flex-start;padding-top: 30rpx;">
				<image :src="company.picture" style="width: 200rpx;height: 200rpx;" mode="aspectFill">
				</image>
				<view style="font-size: 20rpx;line-height: 70rpx;margin-left: 30rpx;">
					<text>地址：{{company.address}}</text><br />
					<text>营业时间：{{company.businesshours}}</text><br />
					<text>联系电话：{{company.contactnumber}}</text>
					<u-rate :value="5" readonly activeColor="#ffff00"></u-rate>
				</view>
			</view>
		</view>
		<view style="padding: 30rpx;padding-bottom: 200rpx;">
			{{company.details}}
		</view>
		<button @click="toexchange" type="primary"
			style="border-radius: 100rpx; position: fixed;bottom: 60rpx;width: 600rpx;left: 75rpx;background-color: #00c297;">预约上门回收</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				company:{}
			}
		},
		onLoad:function(e){
			this.getCompanyDetails(e.id)
		},
		methods: {
			// 前往预约回收页面
			toexchange(){
				uni.navigateTo({
					url:"../home/reservationRecycling"
				})
			},
			getCompanyDetails(id){
				this.$api.companyFindById(id).then(res=>{
					if(res.code=200){
						this.company=res.data
					}else{
						uni.$u.toast(res.msg)
					}
					
				})
			}
		}
	}
</script>

<style>

</style>
